<template>
    <div >
      <tab>
        <tab-item :selected="selectTab==0" @on-item-click="onItemClick">全部</tab-item>
        <tab-item :selected="selectTab==1" @on-item-click="onItemClick">待付款</tab-item>
        <tab-item :selected="selectTab==2" @on-item-click="onItemClick">待发货</tab-item>
        <tab-item :selected="selectTab==3" @on-item-click="onItemClick">待收货</tab-item>
        <tab-item :selected="selectTab==4" @on-item-click="onItemClick">待评价</tab-item>
      </tab>


      <div style="padding: 10px;">
        <order-car></order-car>
      </div>



    </div>
</template>

<script>
  import { Tab, TabItem, Sticky, Divider, XButton, Swiper, SwiperItem } from 'vux'
  import orderCar from './components/orderCar'
    export default {
      name: "my-order",
      props:{
        tabId:''
      },
      components: {
        Tab,
        TabItem,
        Sticky,
        Divider,
        XButton,
        Swiper,
        SwiperItem,
        orderCar
      },
      data(){
        return{
          selectTab:this.tabId,
        }
      },
      mounted(){
        this.anRead();
      },
      methods:{
        anRead(){
          if(!this.tabId){
            this.selectTab = '0'
          }
          console.log(this.tabId);
        },
        onItemClick(){

        }
      }
    }
</script>

<style scoped>

</style>
